﻿using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace QDP.Contracts
{
    /// <summary>表示一个专题应用资源参数结构对象。</summary>
    [DataContract]
    [KnownType(typeof(NavigationBase))]
    public class NavigationConfig
    {
        /// <summary>以默认参数构造一个专题应用资源参数结构对象的实例。</summary>
        public NavigationConfig()
        {
            // 初始化以应用形式加载的组件清单。
            this.Parts = new List<NavigationBase>();
            // 初始化以工具形式运行的组件清单。
            this.Tools = new List<NavigationBase>();
        }
        /// <summary>获取或设置以工具形式运行的组件清单。</summary>
        [DataMember]
        [XmlArrayItem("NavUISLXap", typeof(NavUISLXap))
        , XmlArrayItem("NavDirectory", typeof(NavDirectory))]
        public List<NavigationBase> Tools { get; set; }
        /// <summary>获取或设置以应用形式加载的组件清单。</summary>
        [DataMember]
        [XmlArrayItem("NavUISLXap", typeof(NavUISLXap))
        , XmlArrayItem("NavDirectory", typeof(NavDirectory))]
        public List<NavigationBase> Parts { get; set; }
    }
}